<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>指令</title>
</head>

<body>
  <!-- 创建一个容器 -->
  <!-- 
    v-html: 渲染标签
    const div = document.querySelector('div')
    div.innerHTML = '<h1>{{ msg }}</h1>'

    v-text: 渲染文本
   -->
  <div id="app">
    <div>{{ msg }}, 今天天气很好</div>
    <div v-html="msg">6667777</div>
    <div>{{ tag }}</div>
    <div v-html="tag"></div>
    <div v-text="msg">21212121</div>
    <div v-text="tag"></div>
  </div>
  <script src="./js/vue.js"></script>
  <script>
    const app = new Vue({
      el: '#app',
      data: {
        msg: 'hello world!!',
        tag: '<a href="https://www.baidu.com">百度</a>'
      }
    })
  </script>
</body>

</html>